<html>
<head><meta charset="utf-8"><title>Alias enum · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Alias.20enum.html">Alias enum</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185532833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Alias%20enum/near/185532833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Alias.20enum.html#185532833">(Jan 13 2020 at 20:15)</a>:</h4>
<blockquote>
<p>nikomatsakis: so maybe we want 3 variants ...<br>
... that unify treats the same ...</p>
</blockquote>
<p>Unify doesn't have to change at all then, since it doesn't actually look into the alias (it just puts it in <code>AliasEq</code>, but nothing else)</p>



<a name="185533270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Alias%20enum/near/185533270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Alias.20enum.html#185533270">(Jan 13 2020 at 20:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> So we talked about these two options:</p>
<ul>
<li><code>AliasDefId</code>; putting just the <code>DefId</code> inside the <code>Alias</code> and adding a <code>alias_kind</code> method to <code>RustIrDatabase</code></li>
<li>Changing <code>Alias</code> to an enum (projection, impl trait, type alias)</li>
</ul>
<p>I'm not sure we came to a conclusion there, but either way, <code>unify</code> treats them the same, and the main implementation work is adding support for <code>impl Trait</code> types, right?</p>



<a name="185641455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Alias%20enum/near/185641455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Alias.20enum.html#185641455">(Jan 14 2020 at 21:19)</a>:</h4>
<p><span class="user-mention" data-user-id="125131">@detrumi</span> sounds right. I think I mildly lean towards the simpler type enum for now</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>